package com.jubaopen.dao.ibatis;

import com.jubaopen.bean.Ratio;
import com.jubaopen.dao.RatioDAO;

public class RatioDAOImpl extends BaseIBatisDao implements RatioDAO {

	@Override
	public int add(Ratio ratio) {
		return (Integer) this.getSqlMapClientTemplate().insert(
				"RatioMapper.insert", ratio);
	}
	
	@Override
	public int update(Ratio ratio) {
		return (Integer) this.getSqlMapClientTemplate().update(
				"RatioMapper.update", ratio);
	}
	
	@Override
	public Ratio getRatioByMobile(String mobile) {
		return (Ratio) this.getSqlMapClientTemplate().queryForObject(
				"RatioMapper.getRatioByMobile", mobile);
	}		
	
	@Override
	public Ratio getRatioByUserId(int userId) {
		return (Ratio) this.getSqlMapClientTemplate().queryForObject(
				"RatioMapper.getRatioByUserId", userId);
	}		
	
	
}
